package com.ruiysoft.controller.cart.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.ruiysoft.controller.mdse.vo.SkuListVo;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import java.util.Objects;

/**
 * CartListVo
 */
@Validated
@javax.annotation.Generated(value = "io.swagger.codegen.languages.SpringCodegen", date = "2018-11-03T18:19:54.602+08:00")

public class CartListVo   {
  @JsonProperty("skuId")
  private Long skuId = null;

  @JsonProperty("num")
  private Integer num = null;

  @JsonProperty("sku")
  private SkuListVo sku = null;

  public CartListVo skuId(Long skuId) {
    this.skuId = skuId;
    return this;
  }

  /**
   * Get skuId
   * @return skuId
  **/
  @ApiModelProperty(example = "1", value = "")


  public Long getSkuId() {
    return skuId;
  }

  public void setSkuId(Long skuId) {
    this.skuId = skuId;
  }

  public CartListVo num(Integer num) {
    this.num = num;
    return this;
  }

  /**
   * Get num
   * @return num
  **/
  @ApiModelProperty(example = "1", value = "")


  public Integer getNum() {
    return num;
  }

  public void setNum(Integer num) {
    this.num = num;
  }

  public CartListVo sku(SkuListVo sku) {
    this.sku = sku;
    return this;
  }

  /**
   * Get sku
   * @return sku
  **/
  @ApiModelProperty(value = "")

  @Valid

  public SkuListVo getSku() {
    return sku;
  }

  public void setSku(SkuListVo sku) {
    this.sku = sku;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CartListVo cartListVo = (CartListVo) o;
    return Objects.equals(this.skuId, cartListVo.skuId) &&
        Objects.equals(this.num, cartListVo.num) &&
        Objects.equals(this.sku, cartListVo.sku);
  }

  @Override
  public int hashCode() {
    return Objects.hash(skuId, num, sku);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CartListVo {\n");

    sb.append("    skuId: ").append(toIndentedString(skuId)).append("\n");
    sb.append("    num: ").append(toIndentedString(num)).append("\n");
    sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}

